package tests;

import gameComponents.Board;
import gameComponents.KnightGame;
import gameComponents.Player;
import gamePieces.Knight;
import junit.framework.TestCase;

/**
 * 
 */

/**
 * @author SELMAN
 *
 */
public class KnightGameTest extends TestCase {

	Player p = new Player(1);
	Knight n = new Knight(0,0,p);
	Board b = new Board();
	KnightGame g = new KnightGame();
	/**
	 * @param name
	 */
	public KnightGameTest(String name) {
		super(name);
	}

	/* (non-Javadoc)
	 * @see junit.framework.TestCase#setUp()
	 */
	protected void setUp() throws Exception {
		super.setUp();
	}

	/* (non-Javadoc)
	 * @see junit.framework.TestCase#tearDown()
	 */
	protected void tearDown() throws Exception {
		super.tearDown();
	}

	/**
	 * Test method for {@link KnightGame#play()}.
	 */
	public final void testPlay() {
		fail("Not yet implemented"); // TODO
	}

	/**
	 * Test method for {@link KnightGame#checkIfLost()}.
	 */
	public final void testCheckIfLost() {
		g.getGrid()[1][2] = true;
		g.getGrid()[2][1] = true;
		assertTrue(g.checkIfLost());
	}

	/**
	 * Test method for {@link KnightGame#checkIfVisited(int, int)}.
	 */
	public final void testCheckIfVisited() {
		g.getGrid()[1][2] = true;
		assertTrue(g.checkIfVisited(1,2));
	}

}
